﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

class Fraction : IFormattable
{
    private int numerator, denominator;
    public Fraction(int num, int denom)
    {
        numerator = num;
        denominator = denom;
    }

    public string ToString(string format, IFormatProvider formatProvider)
    {
        if (format == "R")
            return string.Format("{0:0.00}", (double)numerator / (double)denominator);
        if (format == "N")
            return numerator + "/" + denominator;

        return ((double)numerator / (double)denominator).ToString();
    }
}

class Program
{
    static void Main(string[] args)
    {
        Fraction f = new Fraction(3, 13);
        Console.WriteLine("{0,20:N}",f);
    }
}